// import { HttpServerResponse } from '@midwayjs/core';
// import { Context } from '@midwayjs/koa';
export class ServerResponse{
   static JSON_TPL = (data: Record<any, any>, isSuccess: boolean = true,msg?:string): unknown => {
    if (isSuccess) {
      return {
        code: 0,
        data,
        msg:msg || '操作成功'
      };
    } else {
      return {
        code: 1,
        msg: msg || '异常'
      };
    }
  };
}
